local bufs = {{name = [===[Main]===],code=[===[
    
--标准计算器
--by baidutieba 我心飞翔_摩羯
function setup()
    print("标准计算器")
    print("作者:我心飞翔_摩羯")
    print("注意:为了界面美观请不要关闭调试器")
end
function draw()
    background(40, 40, 50)
    stroke(255, 255, 255, 255)
    fill(0, 0, 0, 0)
    rect(65,500,WIDTH/1.2,HEIGHT/3.5)
    fill(197, 201, 202, 186)
    rect(65,380,WIDTH/7,HEIGHT/7)--x加120
    rect(185,380,WIDTH/7,HEIGHT/7)
    rect(305,380,WIDTH/7,HEIGHT/7)
    rect(65,260,WIDTH/7,HEIGHT/7)--y减120
    rect(185,260,WIDTH/7,HEIGHT/7)
    rect(305,260,WIDTH/7,HEIGHT/7)
    rect(65,140,WIDTH/7,HEIGHT/7)
    rect(185,140,WIDTH/7,HEIGHT/7)
    rect(305,140,WIDTH/7,HEIGHT/7)
    rect(65,20,WIDTH/7,HEIGHT/7)
    rect(185,20,WIDTH/7,HEIGHT/7)
    rect(305,20,WIDTH/7,HEIGHT/7)
    --特殊
    rect(425,140,WIDTH/5.82,HEIGHT/7)
    rect(560,140,WIDTH/5.82,HEIGHT/7)
    rect(425,20,WIDTH/5.82,HEIGHT/7)
    rect(560,20,WIDTH/5.82,HEIGHT/7)
    fill(255, 211, 0, 255)
    rect(305+120,260,WIDTH/2.8355,HEIGHT/7)--防止意外255 211 0 25
    fill(209, 35, 35, 255)
    rect(305+120,380,WIDTH/2.8355,HEIGHT/7)--　防止意外209 35 35 255
    fill(82, 86, 91, 190)
    font("Futura-CondensedExtraBold")
    fontSize(100)
    text(9,120,435)--x加120
    text(8,240,435)
    text(7,360,435)
    text(6,120,435-120)--y减120
    text(5,120+120,435-120)
    text(4,360,435-120)
    text(3,120,435-120*2)
    text(2,120+120,435-120*2)
    text(1,120+120*2,435-120*2)
    text(0,120+120,435-120*3)
    text("·",360,435-120*3)
    text("%",120,435-120*3)
    text("+",490,195)
    text("-",490+135,205)
    text("×",490,75)
    text("÷",490+135,75)
    fill(255, 255, 255, 255)
    text("AC",550,433)
    fontSize(120)
    text("=",550,433-120)
    fill(255, 255, 255, 255)
    fontSize(50)
    strokeWidth(10)
    --数字1
    --1
if CurrentTouch.x>120-40 and CurrentTouch.x<120+40 and CurrentTouch.y>435-40 and CurrentTouch.y<435+40 and b~=233  then
        x=9
        a=0    
        fill(40,40,50)
        stroke(40,40,50)
        rect(487,520,WIDTH/4,HEIGHT/5)
        fill(255, 255, 255, 255)
        fontSize(120)
        text("9",640,600)
end
    --2
if CurrentTouch.x>240-40 and CurrentTouch.x<240+40 and CurrentTouch.y>435-40 and CurrentTouch.y<435+40 and b~=233 then
        x=8
        a=0
        fill(40,40, 50)
        stroke(40,40,50)
        rect(487,520,WIDTH/4,HEIGHT/5)
        fill(255, 255, 255, 255)
        fontSize(120)
        text("8",640,600)
end    
    --3
if CurrentTouch.x>360-40 and CurrentTouch.x<360+40 and CurrentTouch.y>435-40 and CurrentTouch.y<435+40 and b~=233 then
        x=7
        a=0
        fill(40,40, 50)
        stroke(40,40,50)
        rect(487,520,WIDTH/4,HEIGHT/5)
        fill(255, 255, 255, 255)
        fontSize(120)
        text("7",640,600)
end   
    --4
if CurrentTouch.x>120-40 and CurrentTouch.x<120+40 and CurrentTouch.y>435-120-40 and CurrentTouch.y<435-120+40 and b~=233 then
        x=6
        a=0
        fill(40,40, 50)
        stroke(40,40,50)
        rect(487,520,WIDTH/4,HEIGHT/5)
        fill(255, 255, 255, 255)
        fontSize(120)
        text("6",640,600)
end   
    --5
if CurrentTouch.x>240-40 and CurrentTouch.x<240+40 and CurrentTouch.y>435-120-40 and CurrentTouch.y<435-120+40 and b~=233 then
        x=5
        a=0
        fontSize(120)
        text("5",640,600)
end     
    --6
if CurrentTouch.x>360-40 and CurrentTouch.x<360+40 and CurrentTouch.y>435-120-40 and CurrentTouch.y<435-120+40 and b~=233 then
        x=4
        a=0
        fill(40,40, 50)
        stroke(40,40,50)
        rect(487,520,WIDTH/4,HEIGHT/5)
        fill(255, 255, 255, 255)
        fontSize(120)
        text("4",640,600)
end   
    --7
if CurrentTouch.x>120-40 and CurrentTouch.x<120+40 and CurrentTouch.y>435-120*2-40 and CurrentTouch.y<435-120*2+40 and b~=233 then
        x=3
        a=0
        fontSize(120)
        text("3",640,600)
end
    --8
if CurrentTouch.x>240-40 and CurrentTouch.x<240+40 and CurrentTouch.y>435-120*2-40 and CurrentTouch.y<435-120*2+40 and b~=233 then
        x=2
        a=0
        fontSize(120)
        text("2",640,600)
end      
    --9
if CurrentTouch.x>360-40 and CurrentTouch.x<360+40 and CurrentTouch.y>435-120*2-40 and CurrentTouch.y<435-120*2+40 and b~=233 then
        x=1
        a=0
        fontSize(120)
        text("1",640,600)
end   
    --10
if CurrentTouch.x>240-40 and CurrentTouch.x<240+40 and CurrentTouch.y>435-120*3-40 and CurrentTouch.y<435-120*3+40 and b~=233 then
        x=0
        a=0
        fontSize(120)
        text("0",640,600)
end
    --运算
    --加法
if a==0 then
        c=2333      
end
if c==2333 and CurrentTouch.x>490-40 and CurrentTouch.x<490+40 and CurrentTouch.y>195-40 and CurrentTouch.y<195+40 then
        f="+"
        b=233
        fill(40,40,50)
        stroke(40,40,50)
        rect(487,520,WIDTH/4,HEIGHT/5)
        fontSize(120)
        fill(255, 255, 255, 255)
        text(x,530,600)
        text("+",604,600)
end
    --减法
if c==2333 and CurrentTouch.x>490+135-40 and CurrentTouch.x<490+135+40 and CurrentTouch.y>205-40 and CurrentTouch.y<205+40 then
        f="-"
        b=233
        fill(40,40,50)
        stroke(40,40,50)
        rect(487,520,WIDTH/4,HEIGHT/5)
        fontSize(120)
        fill(255, 255, 255, 255)
        text(x,530,600)
        text("-",604,600)
end
    --乘法
if c==2333 and CurrentTouch.x>490-40 and CurrentTouch.x<490+40 and CurrentTouch.y>75-40 and CurrentTouch.y<75+40 then
        f="×"
        b=233
        fill(40,40,50)
        stroke(40,40,50)
        rect(487,520,WIDTH/4,HEIGHT/5)
        fontSize(120)
        fill(255, 255, 255, 255)
        text(x,530,600)
        text("×",604,600)
end
    --除法
if c==2333 and CurrentTouch.x>490+135-40 and CurrentTouch.x<490+135+40 and CurrentTouch.y>75-40 and CurrentTouch.y<75+40 then
        f="÷"
        b=233
        fill(40,40,50)
        stroke(40,40,50)
        rect(487,520,WIDTH/4,HEIGHT/5)
        fontSize(120)
        fill(255, 255, 255, 255)
        text(x,530,600)
        text("÷",604,600)
end
    --数字B
    --1
if b==233 and CurrentTouch.x>120-40 and CurrentTouch.x<120+40 and CurrentTouch.y>435-40 and CurrentTouch.y<435+40 then
        y=9
        OK=250
        fill(40,40,50)
        stroke(40,40,50)
        rect(487,520,WIDTH/4,HEIGHT/5)
        fontSize(120)
        fill(255, 255, 255, 255)
        text(x,490,600)
        text(f,564,600)
        text(9,640,600)
end
    --2       
if b==233 and CurrentTouch.x>240-40 and CurrentTouch.x<240+40 and CurrentTouch.y>435-40 and CurrentTouch.y<435+40 then
        y=8
        OK=250
        fill(40,40,50)
        stroke(40,40,50)
        rect(487,520,WIDTH/4,HEIGHT/5)
        fontSize(120)
        fill(255, 255, 255, 255)
        text(x,490,600)
        text(f,564,600)
        text(8,640,600)
end
    --3
if b==233 and CurrentTouch.x>360-40 and CurrentTouch.x<360+40 and CurrentTouch.y>435-40 and CurrentTouch.y<435+40 then
        y=7
        OK=250
        fill(40,40,50)
        stroke(40,40,50)
        rect(487,520,WIDTH/4,HEIGHT/5)
        fontSize(120)
        fill(255, 255, 255, 255)
        text(x,490,600)
        text(f,564,600)
        text(7,640,600)
 end
    --4
if b==233 and CurrentTouch.x>120-40 and CurrentTouch.x<120+40 and CurrentTouch.y>435-120-40 and CurrentTouch.y<435-120+40 then
        y=6
        OK=250
        fill(40,40,50)
        stroke(40,40,50)
        rect(487,520,WIDTH/4,HEIGHT/5)
        fontSize(120)
        fill(255, 255, 255, 255)
        text(x,490,600)
        text(f,564,600)
        text(6,640,600)
end
    --5
if b==233 and CurrentTouch.x>240-40 and CurrentTouch.x<240+40 and CurrentTouch.y>435-120-40 and CurrentTouch.y<435-120+40 then
        y=5
        OK=250
        fill(40,40,50)
        stroke(40,40,50)
        rect(487,520,WIDTH/4,HEIGHT/5)
        fontSize(120)
        fill(255, 255, 255, 255)
        text(x,490,600)
        text(f,564,600)
        text(5,640,600)
end   
    --6
if b==233 and CurrentTouch.x>360-40 and CurrentTouch.x<360+40 and CurrentTouch.y>435-120-40 and CurrentTouch.y<435-120+40 then
        y=4
        OK=250
        fill(40,40,50)
        stroke(40,40,50)
        rect(487,520,WIDTH/4,HEIGHT/5)
        fontSize(120)
        fill(255, 255, 255, 255)
        text(x,490,600)
        text(f,564,600)
        text(4,640,600)
end  
    --7
if b==233 and CurrentTouch.x>120-40 and CurrentTouch.x<120+40 and CurrentTouch.y>195-40 and CurrentTouch.y<195+40 then
        y=3
        OK=250
        fill(40,40,50)
        stroke(40,40,50)
        rect(487,520,WIDTH/4,HEIGHT/5)
        fontSize(120)
        fill(255, 255, 255, 255)
        text(x,490,600)
        text(f,564,600)
        text(3,640,600)
end
    --8
if b==233 and CurrentTouch.x>240-40 and CurrentTouch.x<240+40 and CurrentTouch.y>195-40 and CurrentTouch.y<195+40 then
        y=2
        OK=250
        fill(40,40,50)
        stroke(40,40,50)
        rect(487,520,WIDTH/4,HEIGHT/5)
        fontSize(120)
        fill(255, 255, 255, 255)
        text(x,490,600)
        text(f,564,600)
        text(2,640,600)
end 
    --9
if b==233 and CurrentTouch.x>360-40 and CurrentTouch.x<360+40 and CurrentTouch.y>195-40 and CurrentTouch.y<195+40 then
        y=1
        OK=250
        fill(40,40,50)
        stroke(40,40,50)
        rect(487,520,WIDTH/4,HEIGHT/5)
        fontSize(120)
        fill(255, 255, 255, 255)
        text(x,490,600)
        text(f,564,600)
        text(1,640,600)
end  
    --10
if b==233 and CurrentTouch.x>36-40 and CurrentTouch.x<360+40 and CurrentTouch.y>75-40 and CurrentTouch.y<75+40 then
        y=0
        OK=250
        fill(40,40,50)
        stroke(40,40,50)
        rect(487,520,WIDTH/4,HEIGHT/5)
        fontSize(120)
        fill(255, 255, 255, 255)
        text(x,490,600)
        text(f,564,600)
        text(0,640,600)
end
    --?
if f=="+" and OK==250 then
        n=x+y
end
if f=="-" and OK==250 then
        n=x-y
end
if f=="×" and OK==250 then
        n=x*y
end
if f=="÷" and OK==250 then
        n=x/y
end
    --结果
if OK==250 and CurrentTouch.x>550-40 and CurrentTouch.x<550+40 and CurrentTouch.y>433-120-40 and CurrentTouch.y<433-120+40 then
        fill(40,40,50)
        stroke(40,40,50)
        rect(422,510,WIDTH/3,HEIGHT/4)        
        fontSize(120)
        fill(255, 255, 255, 255)
        text(tostring(n),600,600)
end
if OK~=250 and CurrentTouch.x>550-40 and CurrentTouch.x<550+40 and CurrentTouch.y>433-120-40 and CurrentTouch.y<433-120+40 then
        fill(40,40,50)
        stroke(40,40,50)
        rect(420,510,WIDTH/3,HEIGHT/4)        
        fontSize(80)
        fill(255, 255, 255, 255)
        text("你™在逗我?",465,600)
end
    --清除
if CurrentTouch.x>550-40 and CurrentTouch.x<550+40 and CurrentTouch.y>433-40 and CurrentTouch.y<433+40 then
        restart()
end
    --¿
if CurrentTouch.x>360-40 and CurrentTouch.x<360+40 and CurrentTouch.y>75-40 and CurrentTouch.y<75+40 and CurrentTouch.state==BEGAN then
        sb=999
end
if sb==999 and CurrentTouch.state==ENDED then
        fill(40,40,50)
        stroke(40,40,50)
        rect(422,510,WIDTH/3,HEIGHT/4)        
        fontSize(120)
        fill(255, 255, 255, 255)
        print("期待更新吧（≧∇≦）")
        sb=0
end
if CurrentTouch.x>120-40 and CurrentTouch.x<120+40 and CurrentTouch.y>75-40 and CurrentTouch.y<75+40 and CurrentTouch.state==BEGAN then
        sb=999
end
    if sb==999 and CurrentTouch.state==ENDED then
        fill(40,40,50)
        stroke(40,40,50)
        rect(422,510,WIDTH/3,HEIGHT/4)        
        fontSize(120)
        fill(255, 255, 255, 255)
        print("期待更新吧（≧∇≦）")
        sb=0
end
    --快要终结
    --即将终结
    --马上终结
    --终结
    --其实是写这段字是为了凑行数，不信你看😉
end
 ]===]}}
 for i=1, #bufs do 
    saveProjectTab(bufs[i].name,bufs[i].code) 
end 
print('正在安装 二项式个位数和简易计算器......\n作者：baidutieba 我心飞翔_摩羯')